package com.example.a_java.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.a_java.entity.CustInfo;
import com.example.a_java.mapper.CustInfoMapper;
import com.example.a_java.service.CustInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 客户信息Service实现�?
 */
@Service
public class CustInfoServiceImpl extends ServiceImpl<CustInfoMapper, CustInfo> implements CustInfoService {

    private final CustInfoMapper custInfoMapper;

    public CustInfoServiceImpl(CustInfoMapper custInfoMapper) {
        this.custInfoMapper = custInfoMapper;
    }


    @Override
    public List<CustInfo> findAllByIsDeletedFalse() {
        QueryWrapper<CustInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("is_deleted", false);
        return custInfoMapper.selectList(queryWrapper);
    }
}
